<?php $this->fetch('public/head') ?>
<div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title">
        <li class="layui-this">信息管理</li>
    </ul>
    <?php language_tab();//多语言tab ?>
    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <form class="layui-form form-container" action="<?php echo url('pageinfo') ?>" method="post">
                <div class="list_0 layui-form-item">
                    <label class="layui-form-label">公司名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="title_cn" value="<?php echo $rows['title_cn'] ?>" maxlength="150" lay-verify="required" placeholder="请输入公司名称" class="layui-input">
                    </div>
                </div>
                <div class="list_1 layui-form-item">
                    <label class="layui-form-label">公司名称</label>
                    <div class="layui-input-block">
                        <input type="text" name="title_en" value="<?php echo $rows['title_en'] ?>" maxlength="150" class="layui-input" placeholder="请输入公司名称">
                    </div>
                </div>
                <div class="list_0 layui-form-item">
                    <label class="layui-form-label">图片</label>
                    <div class="layui-upload">
                        <input type="text" name="img_url_cn" value="<?php echo $rows['img_url_cn'] ?>" class="layui-input layui-input-inline">
                        <button type="button" class="layui-btn _img_url" lay-data="{data:{max_width:600,max_height:400,path:'pageinfo'}}"><i class="layui-icon">&#xe67c;</i>上传图片</button>
                        <img src="<?php echo $rows['img_url_cn'] ?>" height="38" data-expander=''>
                        仅允许上传jpg,png,gif,jpeg格式，推荐尺寸600*400
                    </div>
                </div>
                <div class="list_1 layui-form-item">
                    <label class="layui-form-label">图片</label>
                    <div class="layui-upload">
                        <input type="text" name="img_url_en" value="<?php echo $rows['img_url_en'] ?>" class="layui-input layui-input-inline">
                        <button type="button" class="layui-btn _img_url" lay-data="{data:{max_width:600,max_height:400,path:'pageinfo'}}"><i class="layui-icon">&#xe67c;</i>上传图片</button>
                        <img src="<?php echo $rows['img_url_en'] ?>" height="38" data-expander=''>
                        仅允许上传jpg,png,gif,jpeg格式，推荐尺寸600*400
                        <a class="layui-btn layui-btn-primary layui-btn-radius" onclick="copy_img('img_url_cn',this)">选取中文图片</a>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">图集</label>
                    <div class="layui-input-block">
                        <button type="button" class="layui-btn" id="imgList" lay-data="{data:{max_width:630,max_height:420,path:'pageinfo'}}"><i class="layui-icon">&#xe67c;</i>图集上传</button>
                        仅允许上传jpg,png,gif,jpeg格式，推荐尺寸630*420
                        <div id="photo-container">
                            <?php foreach($rows['json_arr_cn'] as $v): ?>
                                <div class="photo-list"><input type="text" name="tit[]" value="<?php echo $v['tit'] ?>" placeholder="标题" maxlength="100" autocomplete="off"  class="layui-input layui-input-inline">
                                    <input type="text" name="photo[]" value="<?php echo $v['img'] ?>" class="layui-input layui-input-inline">
                                    <input type="text" name="sort[]" value="<?php echo $v['sort'] ?>" maxlength="10" title="数字大的在前" style="width: 50px;" class="layui-input layui-input-inline">
                                    <button type="button" class="layui-btn layui-btn-danger remove-photo-btn">移除</button>
                                    &nbsp;<img src="<?php echo $v['img'] ?>" height="38" data-expander=''></div>
                            <?php endforeach; ?>
                        </div>
                    </div>
                </div>
                <div class="list_0 layui-form-item">
                    <label class="layui-form-label">内容</label>
                    <div class="layui-input-block">
                        <textarea id="editor" name="content_cn" class="layui-textarea" style="height: 200px;"><?php echo $rows['content_cn'] ?></textarea>
                    </div>
                </div>
                <div class="list_1 layui-form-item">
                    <label class="layui-form-label">内容</label>
                    <div class="layui-input-block">
                        <textarea id="editor2" name="content_en" class="layui-textarea" style="height: 200px;"><?php echo $rows['content_en'] ?></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="*">保存</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<?php $this->fetch('public/script') ?>

<script type="text/javascript">
    upload_imglist();//多图上传组件加载
</script>